package com.frxuexi.mymvi

import com.frxuexi.lib_http.HttpType
import com.frxuexi.lib_http.NetWorkFactory
import com.frxuexi.mymvi.entity.MessageEntity
import com.frxuexi.mymvi.entity.NewsEntity
import kotlinx.coroutines.flow.Flow
import javax.inject.Inject

@OptIn
class MessRepository @Inject constructor() {

    val apiService by lazy { NetWorkFactory.factory(HttpType.NONE).create(ApiService::class.java) }

    fun getMess(page:Int):Flow<NewsEntity>{
        return apiService.getNews(page)
    }
}